﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
/* This model is the second main important model after the event model where this template specifies the name and the image
 * and the description and the tabs of each template, these tabs can be already defiened tabs like wall, supplies or customized tabs!
 * 
 */
namespace Fish.Models
{
    public class Templates
    {
        //1 = Birthday, 2 = Dish Party, 3 = Outing
        public int ID { get; set; }

        [Required]
        [StringLength(50, MinimumLength = 2)]
        public string Name { get; set; }

        public Boolean isPublic { get; set; }

        public byte[] TemplateImage { get; set; }

        public string Description { get; set; }

        [ScaffoldColumn(false)]
        public int? UsersID { get; set; }

        //0-EventInfo, 1-Supplies, 2-Transport, 3-Wall posts
        public virtual IList<tabNumber> Tabs { get; set; }

        public virtual ICollection<Customizeds> Customized { get; set; }
        public virtual Users User { get; set; }

        [DataType(DataType.DateTime)]
        [ScaffoldColumn(false)]
        public DateTime Created { get; set; }

        [DataType(DataType.DateTime)]
        [ScaffoldColumn(false)]
        public DateTime Modified { get; set; }

        public Templates()
        {
            this.Created = DateTime.Now;
            this.Modified = DateTime.Now;
        }
    }
}